package com.wuhao.springboot.controller;

import com.wuhao.springboot.common.Result;
import com.wuhao.springboot.entity.FaultDetection;
import com.wuhao.springboot.service.SelfCheckService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description
 * @Date 2023/1/30 13:21
 * @Author pq
 */
@RestController
@RequestMapping("/selfcheck")
public class SelfCheckController {

    @Resource
    private SelfCheckService selfCheckService;

    @PostMapping("/check")
    public Result check(@RequestBody FaultDetection faultDetection){
        return Result.success(selfCheckService.getByAirTypeAndAirCondCode(faultDetection));
    }
}
